
buildPath = ../../.build/

build:
	cp -f $(buildPath)/Platform/platform.bit    $(buildPath)/image
	cp -f $(buildPath)/boot/BOOT.BIN            $(buildPath)/image
	cp -f $(buildPath)/kernel/uImage            $(buildPath)/image
	cp -f $(buildPath)/kernel/devicetree.dtb    $(buildPath)/image
	cp -f $(buildPath)/rootfs/uramdisk.image.gz $(buildPath)/image
	cp -f init.sh                               $(buildPath)/image
	cp -f postUpdate.sh                         $(buildPath)/image
	cd $(buildPath) && tar -cvf upgrade image/
	mv $(buildPath)/upgrade $(buildPath)/image

remove:
	cd $(buildPath) && rm -rf image

new:
	make remove
	cd $(buildPath)  && mkdir image
	make build
    
.PHONY:clean